class FirstPage extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            list: [],
            thumburl: '',
            name: '',
            id: '0',
            roomlist: [],
            partcount: 1,
            parts: [{ src: '' }, { src: '' }, { src: '' }],
            categorylist: [],
            select_swiperlink: { name: '请选择' },
            swiperimglist: [],
            category_select_list: [],
            recommendtablehtml: [],
            recommendlist: [],
            detail: { id: -1, name: '' },
            goods_select_html: [],
            currentswipertype: 0,
            swiperlinkhtml: [],
            swipertablehtml: [],
            swiperimghtml: [],
            subtitle: '',
            totalamount: 0,
            exportlist: [],
            // exportlist1:[
            //     {
            //         room:{
            //             name:'',
            //             id:''
            //         },
            //         wjtotal:0,
            //         cptotal:0,
            //         cptotalcount:0,
            //         amount:0,
            //         wj:[{
            //             pid: '',
            //             cid: '-1',
            //             cid1: '-1',
            //             cname: '',
            //             height: "",
            //             width: "",
            //             deep: "",
            //             singleprice: 0,
            //             count: '',
            //             amount: '',
            //             unit: '',
            //             lmsm: '',
            //             mbcz: '',
            //             gtcz: '',
            //         }

            //         ],
            //         cp:[
            //             {
            //                 pid: '',
            //                 cid: '-1',
            //                 cid1: '-1',
            //                 cname: '',
            //                 height: "",
            //                 width: "",
            //                 deep: "",
            //                 singleprice: 0,
            //                 count: '',
            //                 amount: '',
            //                 unit: '',
            //                 lmsm: '',
            //                 mbcz: '',
            //                 gtcz: '',

            //             }
            //         ]
            //     }
            // ],
            swiper: {
                imgs: [],
                links: []
            },
            fileimgshow: !0,
            imgstate: '',
            imgsrc: '',
            to: '',
        };
    }




    componentDidMount() {
        let id = GetQueryString('id'), totalamount = 0, fangjianhtml = []

        dzroom_getlist(res => {
            if (res.issuccess == 1) {
                fangjianhtml.push(<option value={-1}>请选择 </option>)
                res.list.forEach((x, i) => {
                    fangjianhtml.push(
                        <option key={i} value={x.id}>{x.name} </option>
                    )
                })
                this.setState({ roomlist: res.list, fangjianhtml })
            }
        })

        dz_categetlist(res => {
            if (res.issuccess == 1) {
                let { list } = res

                let cate_CPLBhtml = [], cate_GTCZhtml = [], cate_WJLBhtml = [], cate_WJCZhtml = [];
                let list_CPLB = list.filter(x => x.type == 'CPLB')
                let list_GTCZ = list.filter(x => x.type == 'GTCZ')
                let list_WJLB = list.filter(x => x.type == 'WJLB')
                let list_WJCZ = list.filter(x => x.type == 'WJCZ')
                console.log({ list_CPLB, list_GTCZ, list_WJLB, list_WJCZ }, 'list1');

                cate_CPLBhtml.push(<option value={-1}>请选择 </option>)
                list_CPLB.forEach((x, i) => {
                    cate_CPLBhtml.push(
                        <option key={i} value={x.id}>{x.name} </option>
                    )
                })

                cate_GTCZhtml.push(<option value={-1}>请选择 </option>)
                list_GTCZ.forEach((x, i) => {
                    cate_GTCZhtml.push(
                        <option key={i} value={x.id}>{x.name} </option>
                    )
                })

                cate_WJLBhtml.push(<option value={-1}>请选择 </option>)
                list_WJLB.forEach((x, i) => {
                    cate_WJLBhtml.push(
                        <option key={i} value={x.id}>{x.name} </option>
                    )
                })

                cate_WJCZhtml.push(<option value={-1}>请选择 </option>)
                list_WJCZ.forEach((x, i) => {
                    cate_WJCZhtml.push(
                        <option key={i} value={x.id}>{x.name} </option>
                    )
                })

                // catehtml1.push(<option value={-1}>请选择</option>)
                // res.list1.forEach((x, i) => {
                //     catehtml1.push(
                //         <option key={i} value={x.id}>{x.name} </option>
                //     )
                // })
                this.setState({
                    cate_CPLBhtml, list_CPLB, cate_GTCZhtml, list_GTCZ, list_WJLB
                    , cate_WJLBhtml, cate_WJCZhtml, list_WJCZ
                })
            }

        })


        dz_projectdetail_getd(id, res => {
            let detail = res.data
            // console.log(uniq(res.data.roomids.split(',')),'uniq');
            if (detail.rawData == '') {
                dzroom_getlistbyid(
                    uniq(res.data.roomids.split(',')).toString(), res => {
                        let { list } = res
                        if (list.length > 0) {

                            // list.forEach(item=>{
                            //     let cptotalcount = 0,cptotal=0,wjtotal=0;
                            //     item.items.forEach(x=>{
                            //         if(x.type=='CP'){
                            //             cptotalcount+=Number(x.count)
                            //             cptotal+=(Number(x.count)*Number(x.singleprice))
                            //         }else{
                            //             wjtotal+=(Number(x.count)*Number(x.singleprice))
                            //         }
                            //     })
                            //     item['cptotalcount']=Number(cptotalcount).toFixed(2) 
                            //     item['cptotal']=Number(cptotal).toFixed(2) 
                            //     item['wjtotal']=Number(wjtotal).toFixed(2) 
                            //     item['amount']=(Number(wjtotal)+Number(cptotal)).toFixed(2)
                            //     totalamount+=Number(wjtotal)+Number(cptotal)
                            // })
                            this.setState({ exportlist: list })

                        }




                    }
                )
            } else {

                // console.log(),'0000');
                let exportlist = JSON.parse(decodeurl(res.data.rawData))
                this.setState({ exportlist })


            }

            // console.log(uniq(res.data.roomids.split(',')),'uniq');
            console.log(detail, 'detail');
            this.setState({ detail, id })
            console.log(res, 'resres');
        })

        //  $('.modal1').hide()

        // this.freshlist()

    }
    freshlist() {
        dzroom_getlist(res => {
            if (res.issuccess == 1) {

                // this.formatlist(res.list); 
                let roomhtml = [];
                roomhtml.push(<option value={-1}>请选择 </option>)
                res.list.forEach(x => {
                    roomhtml.push(
                        <option value={x.id}>{x.name} </option>
                    )
                })

                this.setState({ list: res.list, roomhtml })

                console.log(res.list)
            }
        })




    }





    /**新建 */
    add() {
        // $('.modal1').show()
        var name = prompt('请输入房间名称')
        if (name != '') {
            aoedzroom({ name }, res => {
                if (res.issuccess == 1) {
                    this.freshlist()
                } else {
                    alert(res.msg)
                }
            })
        }
    }


    // 编辑
    edit(x) {
        var name = prompt('请编辑房间名称', x.name)
        if (name != '' && name != x.name) {
            //  console.log(name,'name');

            dz_projectdetail_add({ id: x.id, name }, res => {
                if (res.issuccess == 1) {
                    //   alert('修改成功')
                    this.freshlist()
                } else {
                    alert(res.msg)
                }
            })
        }

        // 
    }
    tosub(x) {
        window.location.href = "./dz_subcate.html?id=" + x.id + "&name=" + x.name;
    }
    // 排序




    // 删除
    del(e, cid) {
        this.setState({ delid: e, newcid: cid }, () => {
            $('#myModal').modal('toggle');
        })
    }

    confirmdel() {
        let { delid, start } = this.state
        delimg(delid, res => {
            if (res.issuccess == 1) {
                //  alert('删除成功')
                $('#myModal').modal('toggle');
                this.freshlist(start)
            } else {
                $('#myModal').modal('toggle');
                alert(res.msg);
            }
        })
    }

    closemodal() {
        $('.modal1').hide()
    }

    inputchange(prop, e) {
        this.setState({ [prop]: e.target.value })
    }
    confirm() {
        let { name, subtitle } = this.state, err = '';
        if (name.length == 0) err = '请输入名称'
        dz_project_aoe({ name, subtitle }, res => {
            $('.modal1').hide()
            if (res.issuccess == 1) {
                //   alert('提交成功')
                this.freshlist()
            }
        })
    }

    toitem(id) {
        window.location.href = './dz_item.html?id=' + id
    }

    selectfang(a, b, c) {


    }

    // selectchange(e){
    //     this.setState({selectroomid:e.target.value})
    // }

    selectchange(id, ei, t, e) {
        console.log('here-selectchange');
        if (this.state.detail.pool != 'BJ') return

        let { value } = e.target, { exportlist } = this.state, i = exportlist[ei]['items'].findIndex(x => { return x.id == id })

        // let { cp, wj } = this.state,data = {prop:t};
        let list = t == 'GTCZ' ? this.state.list_GTCZ : this.state.list_WJLB
        let item = list.find(x => x.id == value);
        exportlist[ei]['items'][i]['cid1'] = item.id;
        exportlist[ei]['items'][i]['type'] = t == 'GTCZ' ? 'CP' : 'WJ';
        exportlist[ei]['items'][i]['cname1'] = item.name;
        exportlist[ei]['items'][i]['singleprice'] = item.price;
        exportlist[ei]['items'][i]['unit'] = item.unit;

        console.log({ item, 'eitem': exportlist[ei]['items'][i] }, 'itemitem');

        this.setState({ exportlist })
        // if (t == 'GTCZ') {
        //     let { list_GTCZ } = this.state, item = list_GTCZ.find(x => x.id == value);

        //     console.log({item,'eitem':exportlist[ei]['items'][i]},'itemitem');

        //     //  let p = list_+t
        //     // console.log(this.state[p],'gtcz');
        //     // cp[i]['cid1'] = item.id
        //     // cp[i]['cname1'] = item.name
        //     // cp[i]['singleprice'] = item.price
        //     //  additem['unit'] = item.unit
        //    // data = {id:cp[i].id,unit:item.unit,cid:item.id,name:item.name,prop:'GTCZ',price:item.price}
        // }
        // if (t == 'WJLB') {
        //     let { list_WJLB } = this.state, item = list_WJLB.find(x => x.id == value);
        //     exportlist[ei]['items'][i]=item;
        //     // wj[i]['cid'] = item.id
        //     // wj[i]['cname'] = item.name
        //     // wj[i]['unit'] = item.unit
        //   //  data = {id:wj[i].id,name:item.name,price:item.price,unit:item.unit,prop:t,cid:item.id}
        // }


    }


    export() {



        let { exportlist, detail } = this.state;

        let str = '总屋名称,' + detail.name
        //`${topname}\n${housename}\n产品类型,高,宽,深度,单价,数量,总价,单位,立面说明,门板材质/柜体材质\n`
        const jsonData = []
        let total = 0;
        let totalcount = 0;
        // <td className="tconter">{((Number(x.height)* Number(x.width))/1000000).toFixed(2)}</td>
        //                                    <td className="tconter">{(Number(x.singleprice)* (((Number(x.height)* Number(x.width))/1000000).toFixed(2))).toFixed(2)}</td>

        console.log(exportlist, 'exportlistexportlist');
        exportlist.forEach(x => {
            str += `\n房间名称,${x.name}\n产品类型,高,宽,深度,数量,单位,单价,总价,立面说明,门板/柜体材质\n`
            x.items.filter(x => { return x.type == 'CP' }).forEach(y => {
                str += `${y.cname},${y.height},${y.width},${y.deep},${y.count},${y.unit},${y.singleprice},${(Number(y.count) * Number(y.singleprice)).toFixed(2)},${y.lmsm},${y.cname1}\n`
            })
            str += `,,,平方总计,${x.cptotalcount},,金额合计,${x.cptotal}\n\n`

            str += `五金类型,高,宽,深度,数量,单位,单价,总价,立面说明,五金材质\n`
            x.items.filter(x => { return x.type == 'WJ' }).forEach(y => {
                str += `${y.cname},-,-,-,${y.count},${y.unit},${y.singleprice},${(Number(y.count) * Number(y.singleprice)).toFixed(2)},${y.lmsm},${y.cname1}\n`
            })
            str += `,,,,,,,,金额合计,${x.wjtotal}\n`
            str += `总金额,${Math.round(Number(x.cptotal) + Number(x.wjtotal))}\n`
            total = Math.round(Number(total) + Number(x.cptotal) + Number(x.wjtotal))
        })
        str += '\n\n总价合计,' + total
        let uri = 'data:text/csv;charset=utf-8,\ufeff' + encodeURIComponent(str);
        //通过创建a标签实现
        let link = document.createElement("a");
        link.href = uri;
        //对下载的文件命名
        link.download = name + ".csv";
        document.body.appendChild(link);
        link.click();
        document.body.removeChild(link);

    }


    addroom() {
        let { selectroomid, exportlist, totalamount } = this.state;
        if (Number(selectroomid) > 0) {
            dz_getprojectitemlist(selectroomid, res => {
                if (res.issuccess == 1) {
                    let { room, wj, cp } = res;
                    let wjtotal = 0, cptotal = 0, cptotalcount = 0, wjtotalcount = 0, amount = 0
                    wj.forEach(x => {
                        wjtotal = (Number(wjtotal) + (Number(x.singleprice) * Number(x.count))).toFixed(2)
                        wjtotalcount = (Number(wjtotalcount) + Number(x.count)).toFixed(2)
                    })
                    cp.forEach(x => {
                        cptotalcount = (Number(cptotalcount) + Number(x.count)).toFixed(2)
                        cptotal = (Number(cptotal) + (Number(x.singleprice) * Number(x.count))).toFixed(2)
                    })
                    amount = (Number(wjtotal) + (Number(cptotal))).toFixed(2)
                    totalamount = (Number(totalamount) + (Number(amount))).toFixed(2)
                    let item = { room, wjtotal, cptotal, cptotalcount, wjtotalcount, amount, wj, cp }
                    console.log(item, 'item');
                    exportlist.push(item)
                    console.log(exportlist, 'exportlist');
                    this.setState({ exportlist, totalamount })
                }
            })
        }
    }

    save() {

        let { exportlist, id, detail } = this.state;


        dz_projectdetail_editdata(detail.name, JSON.stringify(exportlist), res => {
            if (res.issuccess == 1) {
                alert('保存成功')
                window.location.href = './dz_main.html'
            }

        })

    }

    inputchange1(id, eindex, prop, val) {
        if (this.state.detail.pool != 'BJ') return
        var value = prompt('请输入', val)
        if (value != val && value != '' && value != null) {
            let { exportlist } = this.state, index = exportlist[eindex]['items'].findIndex(x => { return x.id == id })
            exportlist[eindex]['items'][index][prop] = value;
            this.setState({ exportlist })
        }



        
    }

    addfangjian(){

    }



    render() {
        var { list, detail, input_name, exportlist, totalamount, cate_WJLBhtml, fangjianhtml, roomlist, selectfang, cate_GTCZhtml } = this.state;
        console.log(exportlist, 'exportlistexportlist');
        exportlist.forEach(item => {
            let cptotalcount = 0, cptotal = 0, wjtotal = 0;
            item.items.forEach(x => {

                if (x.type == 'CP') {
                    x.count = ((Number(x.height) * Number(x.width)) / 1000000).toFixed(2)
                    cptotalcount += Number(x.count)
                    cptotal = Math.round(Number(cptotal) + (Number(x.count) * Number(x.singleprice)))
                } else {
                    wjtotal = Math.round(Number(wjtotal) + (Number(x.count) * Number(x.singleprice)))
                }
            })
            item['cptotalcount'] = Number(cptotalcount).toFixed(2)
            item['cptotal'] = cptotal
            item['wjtotal'] = wjtotal
            item['amount'] = Math.round(Number(wjtotal) + Number(cptotal))
            totalamount = Math.round(Number(totalamount) + Number(wjtotal) + Number(cptotal))
        })




        return (

            <div className="breadLinebox">
                <div className="content">
                    <p className="p1">房间名称</p> 
                    <input placeholder="请输入房间名称" allowClear value={input_name} onChange={this.inputchange.bind(this, 'input_name')} className="input" />
                    <div className="content">
                        <p className="p1">选择房型</p>
                        <select value={selectfang} onChange={this.selectfang.bind(this)}>{fangjianhtml} </select>
                        <p onClick={this.addfangjian.bind(this)} className="btn">添加</p>
                    </div>
                </div>



                {/* <div className="modal1" >
                    <div onClick={this.closemodal.bind(this)} className="mask"></div>
                    <div className="wrap">
                        <div className="content">
                            <p className="p1">名称</p>
                            <input placeholder="请输入名称" allowClear value={name} onChange={this.inputchange.bind(this, 'name')} className="input" />
                            {/* <p className="p2">{zje}</p>
                        </div>
                        <div className="content">
                            <p className="p1">小标题</p>
                            <input placeholder="请输入小标题" allowClear value={subtitle} onChange={this.inputchange.bind(this, 'subtitle')} className="input" />
                        </div>
                        <div className="btns">
                            <p className="add" onClick={this.confirm.bind(this)}>确定</p>
                            <p className="add" onClick={this.closemodal.bind(this)}>取消</p>
                        </div>
                    </div>
                </div> */}


                <div className='content_wrap panel-default content_wrap'>
                    {/* <div onClick={()=>{window.location.href='./dz_cate.html'}} className='breadLine '>
                        前往分类管理
                    </div> */}
                    {/* <div className='inputs panel-body'>
                        <h3>首页管理</h3>
                    </div> */}
                    {/* <div className="back" onClick={()=>{window.location.href='./dz_main.html'}}>返回</div> */}

                    <div className="content form">
                        {/* <div style={{display:clicknew?"":"none"}} id="div"> */}
                        <div className="titlet">{this.state.detail.name}</div>
                        {
                            exportlist.map((x, exportindex) => {
                                return (
                                    <div>

                                        <div className="content form">
                                            <p>{x.name}</p>

                                            <table className="tab">
                                                <thead>
                                                    <tr>
                                                        {/* <th className="minwidth tconter"><img src="./src/notselection.png"/></th> */}

                                                        <th className="tconter">序号</th>
                                                        <th className="tconter w80">产品类型</th>
                                                        <th className="cz tconter">宽度</th>
                                                        <th className="tconter">高度</th>
                                                        <th className="cz tconter">深度</th>
                                                        <th className="cz tconter">数量</th>
                                                        <th className="cz tconter">单位</th>
                                                        <th className="cz tconter">单价</th>
                                                        <th className="cz tconter">总价</th>
                                                        <th className="cz tconter w80">立面说明</th>
                                                        <th className="cz tconter w80">门板/柜体材质</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    {

                                                        x.items.filter(x => { return x.type == 'CP' }).map((item_cp, index) => {
                                                            return (
                                                                <tr key={index}>
                                                                    {/* <td className="minwidth tconter"><img src="./src/notselection.png"/></td>  */}
                                                                    {/* <td className="tconter">{x.state=="0"?"显示":"隐藏"}</td>  */}
                                                                    <td className="tconter">{index + 1}</td>
                                                                    <td onClick={this.inputchange1.bind(this, item_cp.id, exportindex, 'cname', item_cp.cname)} className="tconter w80">
                                                                        {item_cp.cname}
                                                                    </td>
                                                                    <td onClick={this.inputchange1.bind(this, item_cp.id, exportindex, 'width', item_cp.width)} className="tconter">{item_cp.width}</td>
                                                                    <td onClick={this.inputchange1.bind(this, item_cp.id, exportindex, 'height', item_cp.height)} className="tconter">{item_cp.height}</td>
                                                                    <td onClick={this.inputchange1.bind(this, item_cp.id, exportindex, 'deep', item_cp.deep)} className="tconter">{item_cp.deep}</td>
                                                                    <td className="tconter">{((Number(item_cp.height) * Number(item_cp.width)) / 1000000).toFixed(2)}</td>
                                                                    <td className="tconter">{item_cp.unit}</td>
                                                                    <td onClick={this.inputchange1.bind(this, item_cp.id, exportindex, 'singleprice', item_cp.singleprice)} className="tconter">{item_cp.singleprice}</td>
                                                                    <td className="tconter">{Math.round(Number(item_cp.singleprice) * Number(((Number(item_cp.height) * Number(item_cp.width)) / 1000000)))}</td>
                                                                    <td onClick={this.inputchange1.bind(this, item_cp.id, exportindex, 'lmsm', item_cp.lmsm)} className="tconter w80">{item_cp.lmsm}</td>
                                                                    {/* <td className="tconter w80"> {item_cp.cname1}</td> */}
                                                                    <td className="tconter">
                                                                        <select value={item_cp.cid1} onChange={this.selectchange.bind(this, item_cp.id, exportindex, 'GTCZ')}>  {cate_GTCZhtml} </select>
                                                                    </td>
                                                                </tr>
                                                            )

                                                        })
                                                    }
                                                </tbody>
                                            </table>
                                            {/* <div className="tongji">
                                                <div>
                                                <p> 数量合计：{x.cptotalcount}</p>
                                                <p> 合计：{x.cptotal}</p>
                                                </div>
                                                    
                                               
                                            </div> */}


                                            <table className="tab">
                                                <thead>
                                                    <tr>
                                                        {/* <th className="minwidth tconter"><img src="./src/notselection.png"/></th> */}

                                                        <th className="tconter">序号</th>
                                                        <th className="tconter w80">五金类别</th>
                                                        <th className="cz tconter">宽度</th>
                                                        <th className="tconter">高度</th>
                                                        <th className="cz tconter">深度</th>
                                                        <th className="cz tconter">数量</th>
                                                        <th className="cz tconter">单位</th>
                                                        <th className="cz tconter">单价</th>
                                                        <th className="cz tconter">总价</th>
                                                        <th className="cz tconter w80">立面说明</th>
                                                        <th className="cz tconter w80" >备注</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    {
                                                        x.items.filter(x => { return x.type == 'WJ' }).map((item_cp, i) => {
                                                            return (
                                                                <tr key={i}>
                                                                    {/* <td className="minwidth tconter"><img src="./src/notselection.png"/></td>  */}
                                                                    {/* <td className="tconter">{x.state=="0"?"显示":"隐藏"}</td>  */}
                                                                    <td className="tconter">{i + 1}</td>
                                                                    {/* <td className="tconter w80">
                                                                    {item_cp.cname1}
                                                                    </td> */}
                                                                    <td className="tconter">
                                                                        {this.state.detail.pool == 'BJ' ?
                                                                            <select value={item_cp.cid1} onChange={this.selectchange.bind(this, item_cp.id, exportindex, 'WJLB')}>  {cate_WJLBhtml} </select>
                                                                            :
                                                                            <td className="tconter">{item_cp.cname1}</td>
                                                                        }

                                                                    </td>
                                                                    <td className="tconter">-</td>
                                                                    <td className="tconter">-</td>
                                                                    <td className="tconter">-</td>
                                                                    <td onClick={this.inputchange1.bind(this, item_cp.id, exportindex, 'count', item_cp.count)} className="tconter">{item_cp.count}</td>
                                                                    <td className="tconter">{item_cp.unit}</td>
                                                                    <td onClick={this.inputchange1.bind(this, item_cp.id, exportindex, 'singleprice', item_cp.singleprice)} className="tconter">{item_cp.singleprice}</td>
                                                                    <td className="tconter">{Math.round(Number(item_cp.singleprice) * Number(item_cp.count))}</td>
                                                                    <td onClick={this.inputchange1.bind(this, item_cp.id, exportindex, 'lmsm', item_cp.lmsm)} className="tconter w80">{item_cp.lmsm}</td>
                                                                    <td className="tconter w80"> {item_cp.cname}</td>
                                                                </tr>
                                                            )

                                                        })
                                                    }
                                                </tbody>
                                            </table>
                                            {/* <div className="tongji">
                                                <div>
                                                <p> 合计：{x.wjtotal}</p>
                                                </div>

                                            </div> */}
                                            <div className="tongji he">
                                                <p>合计金额：{x.amount}</p>
                                            </div>

                                        </div>
                                    </div>

                                )
                            })
                        }


                        <div className="tabletit" >

                            {/* <select value={selectroomid} onChange={this.selectchange.bind(this)}>{roomhtml} </select>

    <p className="add" style={{'cursor':'pointer'}} onClick={this.addroom.bind(this)}>添加</p> */}

                            <p>总金额：{totalamount}</p>
                            <div>
                                <p className="add" style={{ 'cursor': 'pointer' }} onClick={this.export.bind(this)}>导出</p>
                                <p className="add" style={{ 'cursor': 'pointer', display: detail.pool == 'BJ' ? '' : 'none' }} onClick={this.save.bind(this)}>保存</p>
                                <p className="add" style={{ 'cursor': 'pointer' }} onClick={() => { window.location.href = './dz_main.html' }}>返回</p>
                            </div>
                        </div>



                    </div>

                </div >


            </div >


        )
    }
}





ReactDOM.render(
    <div>
        {/* <LeftMenu code='0' /> */}
        <FirstPage />
    </div>
    //<Barrage/>
    , $('.container')[0]
)